package com.cap.bts.crmdp.dealer.meal.dao;

import java.util.List;

import com.cap.bts.crmdp.dealer.meal.domain.MealModel;
import com.cap.bts.crmdp.dealer.meal.dto.MealDefineDto;
import com.cap.bts.framework.common.dao.IBaseDao;
import com.cap.bts.framework.common.exception.AppException;

public interface IMealManageDao extends IBaseDao<MealModel, Long> {

    /**
     * 查询套餐信息
     * 
     * @param mealModel
     * @return
     * @throws AppException
     */
    public List<MealModel> getMealList(MealDefineDto dto) throws AppException;

    /**
     * 新增套餐信息
     * 
     * @param mealModel
     * @return
     * @throws AppException
     */
    public MealModel insertMealInfo(MealModel mealModel) throws AppException;

    /**
     * 根据套餐编号查询套餐信息
     * 
     * @param mealModel
     * @return
     * @throws AppException
     */
    public MealModel getMealInfoByCode(MealModel mealModel) throws AppException;

    /**
     * 根据套餐ID修改套餐信息
     * @param dto
     * @return
     * @throws AppException
     */
    public boolean updateMealInfo(MealDefineDto dto) throws AppException;

    /**
     * 根据套餐ID查询套餐信息
     * @param mealModel
     * @return
     * @throws AppException
     */
    public MealModel getMealInfoById(MealModel mealModel) throws AppException;

    /**
     * 根据N个条件查询套餐信息
     * @param mealDefineDto
     * @return
     * @throws AppException
     */
    public List<MealModel> getMealModelListByParams(MealDefineDto mealDefineDto)
                                                                                throws AppException;

    /**
     * 套餐启用或者停用
     * @param dto
     * @return
     * @throws AppException
     */
    public boolean packageEnabled(MealDefineDto dto) throws AppException;

    /**
     * 根据优惠券和提货券的ID查询有效状态的套餐
     * @param mealDefineDto
     * @return
     * @throws AppException
     */
    public List<MealModel> getMealModelListByTicketId(Long ticketDefId) throws AppException;

}
